<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%sms}}".
 *
 * @property string $id 编号，自增，主键
 * @property string $mobile 目标手机
 * @property string $message 短信内容
 * @property int $send_time 最后发送时间
 * @property int $send_status 发送状态：1,发送成功；2，发送失败
 * @property int $send_times 发送次数
 */
class Sms extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%sms}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['message'], 'string'],
            [['send_time', 'send_status', 'send_times'], 'integer'],
            [['mobile'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'mobile' => Yii::t('app', 'Mobile'),
            'message' => Yii::t('app', 'Message'),
            'send_time' => Yii::t('app', 'Send Time'),
            'send_status' => Yii::t('app', 'Send Status'),
            'send_times' => Yii::t('app', 'Send Times'),
        ];
    }
}
